Synchronization of a disaster-recovery system

ABSTRACT

A method and associated systems for synchronizing a disaster-recovery system of a database. A processor identifies transactions that affect data blocks of a database and records each change in a vector form. For each block, the processor determines a more efficient way to communicate changes made to the block by a subset of the identified transactions. If fewer resources are needed to communicate an updated image of the entire changed block than would be needed to instead communicate a related set of change vectors that identify changes made to the block by the subset of transactions, then the processor communicates the updated image to the disaster-recovery system. Otherwise, the processor instead communicates the related change vectors to the disaster-recovery system. The processor repeats these determinations and communications for each block of the database that was changed by an identified transaction.

This application is a continuation application claiming priority to Ser.No. 14/288,700, filed May 28, 2014.

TECHNICAL FIELD

The present invention relates to synchronizing disaster-recoverysystems.

BACKGROUND

A disaster-recovery system associated with a database system or with aother type of information-storage system must be able to efficientlymonitor and record transactions that may alter its stored data.

In systems that process large numbers of transactions, this monitoringand recording can be resource-intensive. The transaction information maybe so large and so complex that transferring it from a local monitoringentity to a disaster-recovery mechanism may consume large amounts ofbandwidth or other resources.

BRIEF SUMMARY

A first embodiment of the present invention provides a method forsynchronizing a disaster-recovery system of a database, the methodcomprising:

-   -   a processor of a computer system monitoring a set of        transactions associated with the database, wherein the database        comprises a set of data blocks, and wherein each transaction of        the set of transactions identifies an alteration to one or more        data blocks of the set of data blocks;    -   the processor choosing a subset of transactions of the set of        transactions, wherein each transaction of the subset of        transactions identifies an alteration to a first data block of        the set of data blocks;    -   the processor creating a set of block images, wherein a first        image of the set of block images corresponds to the first data        block;    -   the processor generating a set of change vectors, wherein each        vector of the set of change vectors corresponds to one        transaction of the subset of transactions;    -   the processor updating the first block image as a function of        changes made to the first block image by the subset of        transactions;    -   the processor determining whether transmitting the updated first        block image to the disaster-recovery system is more efficient        than transmitting the set of change vectors to the        disaster-recovery system;    -   the processor transmitting either the first block image or the        set of change vectors to the disaster-recovery entity as a        function of the determining.

A second embodiment of the present invention provides a computer programproduct, comprising a computer-readable hardware storage device having acomputer-readable program code stored therein, said program codeconfigured to be executed by a processor of a computer system toimplement a method for synchronizing a disaster-recovery system of adatabase, the method comprising:

-   -   the processor monitoring a set of transactions associated with        the database, wherein the database comprises a set of data        blocks, and wherein each transaction of the set of transactions        identifies an alteration to one or more data blocks of the set        of data blocks;    -   the processor choosing a subset of transactions of the set of        transactions, wherein each transaction of the subset of        transactions identifies an alteration to a first data block of        the set of data blocks;    -   the processor creating a set of block images, wherein a first        image of the set of block images corresponds to the first data        block;    -   the processor generating a set of change vectors, wherein each        vector of the set of change vectors corresponds to one        transaction of the subset of transactions;    -   the processor updating the first block image as a function of        changes made to the first block image by the subset of        transactions;    -   the processor determining whether transmitting the updated first        block image to the disaster-recovery system is more efficient        than transmitting the set of change vectors to the        disaster-recovery system;    -   the processor transmitting either the first block image or the        set of change vectors to the disaster-recovery entity as a        function of the determining.

A third embodiment of the present invention provides a computer systemcomprising a processor, a memory coupled to said processor, and acomputer-readable hardware storage device coupled to said processor,said storage device containing program code configured to be run by saidprocessor via the memory to implement a method for synchronizing adisaster-recovery system of a database, the method comprising:

-   -   the processor monitoring a set of transactions associated with        the database, wherein the database comprises a set of data        blocks, and wherein each transaction of the set of transactions        identifies an alteration to one or more data blocks of the set        of data blocks;    -   the processor choosing a subset of transactions of the set of        transactions, wherein each transaction of the subset of        transactions identifies an alteration to a first data block of        the set of data blocks;    -   the processor creating a set of block images, wherein a first        image of the set of block images corresponds to the first data        block;    -   the processor generating a set of change vectors, wherein each        vector of the set of change vectors corresponds to one        transaction of the subset of transactions;    -   the processor updating the first block image as a function of        changes made to the first block image by the subset of        transactions;    -   the processor determining whether transmitting the updated first        block image to the disaster-recovery system is more efficient        than transmitting the set of change vectors to the        disaster-recovery system;    -   the processor transmitting either the first block image or the        set of change vectors to the disaster-recovery entity as a        function of the determining.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a structure of a computer system and computer program codethat may be used to implement a method for synchronizing adisaster-recovery system of a database in accordance with embodiments ofthe present invention.

FIG. 2 is a flow chart that shows a high-level view of an embodiment ofa method for synchronizing a disaster-recovery system of a database inaccordance with embodiments of the present invention.

FIG. 3 is a flow chart that describes detailed steps of an embodiment ofa method for synchronizing a disaster recovery system of a database inaccordance with embodiments of the present invention.

DETAILED DESCRIPTION

Embodiments of the present invention present a method and associatedsystems for optimizing a task of synchronizing a database or othersystem that comprises an information repository) with adisaster-recovery entity that may be called upon to back up and restoredatabase contents after a data loss.

In order to be effective, both the database and the disaster-recoveryentity must have substantially continuous access to current contents ofthe database or other stored data, even if those two systems are locatedat geographically distinct sites or do not share a real-time dataconnection.

In many implementations, this substantially continuous access may beprovided to the database system (which may herein also refer to othertypes of information repositories) by a monitoring or logging mechanismthat monitors or records transactions that may change stored data to thedatabase. In such cases, the substantially continuous access may beprovided to the disaster-recovery system by forwarding information onassociated with the monitored or recorded transactions to thedisaster-recovery system through a communications mechanism.

When a database system has many users, is subject to many transactions,or is subject to changes that comprise alterations of large amounts ofdata, the monitored or recorded information may grow large. In suchcases, it may not be possible to communicate such information to adisaster-recovery system in a timely manner, thus raising thepossibility that not all data will be available to the disaster-recoverysystem when a data loss occurs without warning.

It is thus an advantage of the present invention to evaluate and processthe monitored or recorded information such that informationcommunications to the disaster-recovery system is optimized to requirefewer resources. Such optimized transaction information may require lesscommunications bandwidth, storage space, processor resources, or memoryusage, and may be transmitted more quickly and more often.

In this document, we will, for the sake of illustration, refer toembodiments of the present invention that optimize synchronization of adisaster-recovery system with a database system. These references do notimply a constraint on the scope of the present invention to databasesystems, and embodiments of the present invention may be associated withany type of system at comprises an information repository, wherein theinformation repository comprises data that may be changed and that mustbe restored in the event of a data loss.

FIG. 1 shows a structure of a computer system and computer program codethat may be used to implement a method for synchronizing adisaster-recovery system of a database in accordance with embodiments ofthe present invention. FIG. 1 refers to objects 101-115.

Aspects of the present invention may take the form of an entirelyhardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module,” or “system.”

The present invention may be a system, a method, and/or a computerprogram product, The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). sonic alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

In FIG. 1, computer system 101 comprises a processor 103 coupled throughone or more I/O Interfaces 109 to one or more hardware data storagedevices 111 and one or more I/O devices 113 and 115.

Hardware data storage devices 111 may include, but are not limited to,magnetic tape drives, fixed or removable hard disks, optical discs,storage-equipped mobile devices, and solid-state random-access orread-only storage devices. I/O devices may comprise, but are not limitedto: input devices 113, such as keyboards, scanners, handheldtelecommunications devices, touch-sensitive displays, tablets, biometricreaders, joysticks, trackballs, or computer mice; and output devices115, which may comprise, but are not limited to printers, plotters,tablets, mobile telephones, displays, or sound-producing devices. Datastorage devices 111, input devices 113, and output devices 115 may belocated either locally or at remote sites from which they are connectedto I/O Interface 109 through a network interface.

Processor 103 may also be connected to one or more memory devices 105,which may include, but are not limited to, Dynamic RAM (DRAM), StaticRAM (SRAM), Programmable Read-Only Memory (PROM), Field-ProgrammableGate Arrays (FPGA), Secure Digital memory cards, SIM cards, or othertypes of memory devices.

At least one memory device 105 contains stored computer program code107, which is a computer program that comprises computer-executableinstructions. The stored computer program code includes a program thatimplements a method for synchronizing a disaster-recovery system of adatabase in accordance with embodiments of the present invention, andmay implement other embodiments described in this specification,including the methods illustrated in FIGS. 1-3. The data storage devices111 may store the computer program code 107. Computer program code 107stored in the storage devices 111 is configured to be executed byprocessor 103 via the memory devices 105. Processor 103 executes thestored computer program code 107.

Thus the present invention discloses a process for supporting computerinfrastructure, integrating, hosting, maintaining, and deployingcomputer-readable code into the computer system 101, wherein the code incombination with the computer system 101 is capable of performing amethod for synchronizing a disaster-recovery system of a database.

Any of the components of the present invention could be created,integrated, hosted, maintained, deployed, managed, serviced, supported,etc, by a service provider who offers to facilitate a method forsynchronizing a disaster-recovery system of a database. Thus the presentinvention discloses a process for deploying or integrating computinginfrastructure, comprising integrating computer-readable code into thecomputer system 101, wherein the code in combination with the computersystem 101 is capable of performing a method for synchronizing adisaster-recovery system of a database.

One or more data storage units 111 (or one or more additional memodevices not shown in FIG. 1) may be used as a computer-readable hardwarestorage device having a computer-readable program embodied thereinand/or having other data stored therein, wherein the computer-readableprogram comprises stored computer program code 107. Generally, acomputer, program product (or, alternatively, an article of manufacture)of computer system 101 may comprise said computer-readable hardwarestorage device.

While it is understood that program code 107 for synchronizing adisaster-recovery system of a database may be deployed by manuallyloading the program code 107 directly into client, server, and proxycomputers (not shown) by loading the program code 107 into acomputer-readable storage medium (e.g., computer data storage device111), program code 107 may also be automatically or semi-automaticallydeployed into computer system 101 by sending program code 107 to acentral server (e.g., compute system 101) or to a group of centralservers. Program code 107 may then be downloaded into clientcomputers(not shown) that will execute program code 107.

Alternatively, program code 107 may be sent directly to the clientcomputer via e-mail. Program code 107 may then either be detached to adirectory on the client computer or loaded into a directory on theclient computer by an e-mail option that selects a program that detachesprogram code 107 into the directory.

Another alternative is to send program code 107 directly to a directoryon the client computer hard drive. If proxy servers are configured, theprocess selects the proxy server code, determines on which computers toplace the proxy servers' code, transmits the proxy server code, and theninstalls the proxy server code on the proxy computer. Program code 107is then transmitted to the proxy server and stored on the proxy server.

In one embodiment, program code 107 for synchronizing adisaster-recovery system of a database is integrated into a client,server and network environment by providing for program code 107 tocoexist with software applications (not shown), operating systems (notshown) and network operating systems software (not shown) and theninstalling program code 107 on the clients and servers in theenvironment where program code 107 will function.

The first step of the aforementioned integration of code included inprogram code 107 is to identify any software on the clients and servers,including the network operating system (not shown), where program code107 will be deployed that are required by program code 107 or that workin conjunction with program code 107. This identified software includesthe network operating system, where the network operating systemcomprises software that enhances a basic operating system by addingnetworking features. Next, the software applications and version numbersare identified and compared to a list of software applications andcorrect version numbers that have been tested to work with program code107. A software application that is missing or that does not match acorrect version number is upgraded to the correct version.

A program instruction that passes parameters from program code 107 to asoftware application is checked to ensure that the instruction'sparameter list matches a parameter list required by the program code107. Conversely, a parameter passed by the software application toprogram code 107 is checked to ensure that the parameter matches aparameter required by program code 107. The client and server operatingsystems, including the network operating systems, are identified andcompared to a list of operating systems, version numbers, and networksoftware programs that have been tested to work with program code 107.An operating system, version number, or network software program thatdoes not match an entry of the list of tested operating systems andversion numbers is upgraded to the listed level on the client computersand upgraded to the listed level on the server computers.

After ensuring that the software, where program code 107 is to bedeployed, is at a correct version level that has been tested to workwith program code 107, the integration is completed by installingprogram code 107 on the clients and servers.

Embodiments of the present invention may be implemented as a methodperformed by a processor of a computer system, as a computer programproduct, as a computer system, or as a processor-performed process orservice for supporting computer infrastructure.

FIG. 2 is a flow chart that shows a high-level view of an embodiment ofa method for synchronizing a disaster-recovery system of a database inaccordance with embodiments of the present invention. FIG. 2 comprisessteps 200-250.

Step 200 initiates an iterative procedure of steps 200-250, in which aprocessor of a computer system monitors user database transactions,generates change vectors that each identifies one transaction, andfilters out transactions that do not change data stored in the database.Each iteration of this iterative procedure logs and processes onetransaction.

In step 210, the processor detects a performance of a current databasetransaction. This procedure may be performed by means known to thoseskilled in the art of database maintenance, such as atransaction-logging utility comprised by a database-managementapplication, or by middleware, system-maintenance software, or an othermechanism.

In some embodiments, each logged transaction might be identified by aunique transaction identifier or change identifier generated by thetransaction-logging mechanism or by some other mechanism intrinsic tothe database, the database-management system, or to a component of anembodiment of the present invention. In some embodiments, thetransaction-logging mechanism may log a transaction only if thattransaction alters a data block.

In step 220, the processor generates a change vector as a function ofthe current transaction detected in the most recent iteration of step210.

A change vector may comprise many types of data, but in a simpleembodiment of the present invention, it may comprise two elements, inany order:

-   -   i) a unique “change-vector identifier” selected as a function of        a transaction identifier associated with the transaction        detected in step 210. This transaction identifier may be a code        that is associated with the transaction by the mechanism that        originally identified the transaction; and    -   ii) a unique “block identifier” that identifies a data block of        the database that has been affected by the current transaction.        Here, a data block is a logical unit of storage maintained by        the database-management system, such that the boundaries and        scope of the data block are not visible to a user. If, for        example, a user-visible database table comprises information        stored in multiple data blocks, when a user requests a        transaction that changes one record of that table, the database        management system might also change contents of one or more        corresponding data blocks associated with the table. In such a        case, the user would see only the change to the record and would        not know which blocks were altered.

In this simple example, a change vector would thus comprise an orderedpair of identifiers. In some embodiments, a change vector may furthercomprise other types of information that may characterize thetransaction, the data block, the user activity, or an other element ofthe database implementation.

In some cases, a transaction may be associated with more than one changevector, such as would be the case when a single transaction changesmultiple blocks, or when the single transaction performs a sequence ofdata changes. In such cases, a more flexible type of change-vectoridentifier may be selected that associates each such change vector withthe single transaction.

In some embodiments, the processor may receive a change vector, ratherthan generate a change vector. In such embodiments, thedatabase-management system or some component or software mechanismcomprised by the database or by the database-management system, mayautomatically generate each change vector when identifying acorresponding transaction, or may translate logged transactioninformation into one or more change vectors. In such embodiments, and inother embodiments described herein, a method of the present invention,rather than generate new change vectors, may select some or all of thereceived change vectors to be discarded by means of logic analogous orcomplementary to that described below.

If the current transaction does not affect a data block, the currentchange vector may not specify a block identifier, or it may indicate insome other way that the transaction did not alter any data block of thedatabase.

In step 230, the processor determines whether the current transaction,associated with the change vector generated in step 220, is of a typethat may alter a data block of the database.

In one example, if the processor determines that the change vector isassociated with an undo command that reversed a change to a data blockthat had been effected by an earlier transaction, the processor in step230 would determine that the current transaction did not change a datablock, and the method of FIG. 2 would continue with step 240. In someembodiments, the processor would further note that the earliertransaction also no longer affects a data block.

If the earlier transaction was not logged and detected by the method ofFIG. 2, or if the earlier transaction is otherwise not available to themethod of FIG. 2, some embodiments not conclude that the current changevector did change a data block. In such a case, both the undo operationitself which reversed a previous change to a data block, might betreated as having changed the previously changed block; and the earliertransaction, which originally effected the previous change, would alsobe treated as having changed the block. Such an embodiment would thencontinue with step 250.

In another example, the processor might, in step 230 determine that thecurrent transaction did not change a data block because the transactionwas uncommitted. An uncommitted transaction is one that has not beenexpressly performed. A transaction may be considered uncommitted if itwas reversed by a user, if it is part of a more complex procedure thatwas reversed when the state of the database or of a portion of thedatabase was rolled back to a previous state, or when the transactioncould not be performed because a fault condition. Such fault conditionsmay, for example, include a user disconnection, an unexpected sessiontermination, a user's failure to complete a transaction, or a hardwareor software outage.

In some embodiments, the processor may, upon identifying an uncommittedtransaction, further identify other transactions that are associatedwith the uncommitted transaction. This further identification may beperformed by means known to those skilled in the art, such as selectingtransactions that occurred during a specific period of time.

In step 240, if the processor determined in step 230 that the currenttransaction does not alter a data block, then the processor discards thecurrent change vector. In some embodiments, if the processor in step 230determined that other, previously generated, change vectors correspondto transactions related to the current transaction, the processor mayfurther discard the change vectors associated with the other, previouslygenerated, change vectors.

At the conclusion of step 240, the current iteration of the iterativeprocess of FIG. 2 concludes and the next iteration may begin with step200.

In step 250, if the processor determined in step 230 that the currenttransaction did alter a data block, then the processor retains thecurrent change vector. At the conclusion of step 250, the currentiteration of the iterative process of FIG. 2 concludes and the nextiteration may begin with step 200.

The method of FIG. 2 continues in this way detecting transactions,generating change vectors, and determining which vectors to retain.Depending on embodiment details, this procedure may precede or may beperformed concurrently with the method of FIG. 3, which uses theretained change vectors to synchronize the database with adisaster-recovery system.

In some embodiments, the method of FIG. 2 may run continuously, so longas the database is operational, and at times identified by a schedule orby an occurrence of a condition, the processor may perform the method ofFIG. 3 on a set or subset of the change vectors accumulated during theprocessor's performance of the method of FIG. 2.

In other embodiments, the processor may initiate the method of FIG. 3 byactively pulling a set or subset of a set of change vectors accumulatedor previously stored by performance of a method of FIG. 2.

FIG. 3 is a flow chart that describes detailed steps of an embodiment ofa method for synchronizing a disaster-recovery system of a database inaccordance with embodiments of the present invention. FIG. 3 comprisessteps 300-370.

Step 300 initiates an outer iterative procedure of steps 300-360. Eachiteration of this outer procedure determines a more efficient way tocommunicate synchronizing information to the disaster-recovery system,wherein the synchronizing information comprises information abouttransactions associated with one data block of the database.

In some embodiments, this iterative procedure is performed once for eachdata block of the database that has been changed by a loggedtransaction. In some embodiments, this iterative procedure is performedonce for every data block of the database, regardless of whether a blockhas been changed by a logged transaction since a previous performance ofthe iterative procedure, or of the method of FIG. 3.

Step 310 initiates an inner iterative procedure of steps 310-320. Eachiteration of this inner iterative procedure considers all change vectorsgenerated in step 220 and retained in step 250. In some embodiments,this procedure will comprise selecting a subset of these retained changevectors, wherein the subset comprises only those vectors that areassociated with transactions that affect the current data block beingconsidered by the current iteration of the outer iterative procedure ofsteps 300-360.

In step 320, the processor identifies and aggregates resources needed toreconstruct changes to the current data block, wherein each change isassociated with one retained vector. Each iteration of step 320considers an effect of the current retained vector, being considered bythe current iteration of the inner iterative process of steps 310-320,upon the current data block, being considered by the current iterationof the outer iterative process of steps 300-360.

In some embodiments, a change vector is considered in step 320 only ifit has been identified to have effected a change upon the current datablock. In other embodiments, the processor in step 320 first determineswhether the current change vector has been identified to have effected achange upon the current data block, and if the processor determines thatthe vector has not effected such a change, it concludes the currentiteration of the inner iterative process without further evaluation.

in step 320, the processor may perform an implementation-dependentprocedure that may comprise a combination of subtasks that allow theprocessor to identify a type of resource consumption deemed relevant tothe goals of the embodiment. The processor may, for example, determinewhether the current vector is associated with a transaction that adds alarge amount of data to the database. Because sending such a transactionto a disaster-recovery system might impose a burdensome load on anetwork or other communications mechanism connected to thedisaster-recovery system, such a transaction might be associated withgreater resource consumption than a transaction that is associated witha large amount of data.

In some cases, a transaction may be associated with more than one changevector, such as would be the case when a single transaction changesmultiple blocks, or when a single complex transaction performs asequence of changes.

If a transaction is associated with more than one change vector, theprocessor in step 320 may aggregate the effects or resource requirementsof each vector of the more than one change vectors.

In some embodiments, the processor in step 320 may merely count thenumber of retained vectors associated with transactions that effect achange on the current data block. Such an embodiment may assume that aresource consumption of a series of transactions is proportional to anumber of change vectors associated with that series of transactions.

The inner iterative procedure of steps 310-320 repeats it this manner,performing one iteration for each vector to be considered. During eachiteration, each vector is characterized by an amount of resourceconsumption required in order to reconstruct a transaction associatedwith the vector. When all vectors have been so considered, the procedureof steps 310-320 concludes and the method of FIG. 3 continues with step330.

At the conclusion of the last iteration of the inner procedure of steps310-320, the processor will have estimated total resource consumptionnecessary to use change vectors to synchronize the current data blockunder consideration with an analogous data block comprised by thedisaster-recovery system's backup database. This resource consumptioncomprises a consumption of resources necessary to transmit to thedisaster recovery system all such change vectors, and all additionaldata necessary to perform operations identified by the change vectorsupon the current data block.

In some embodiments, this total resource consumption may be a functionof the total amount of data that must be transmitted to thedisaster-recovery system in order to use change vectors to synchronizethe content or state of the current data block with the content or stateof an analogous data block comprised by the disaster-recovery system'sbackup database.

In example, if twelve transactions together updated one kilobyte of datacomprised by a production database's data block [00012947], transmittingthe change vectors associated with those twelve transactions, along withthe kilobyte of data updates, might require 1.5 kilobytes to betransmitted to the disaster-recovery system. Upon receipt of thistransmission, the disaster-recovery system would reproduce, in properorder, the operations identified by the change vectors needed to updatean appropriate data block of the disaster-recovery's database. At theconclusion of this updating, the appropriate disaster-recovery datablock would be identical to, or synchronized with, data block [00012947]of the production database.

In this exemplary embodiment, wherein a “cost” of synchronizing thedatabase by means of change vectors is associated with an amount of datathat must be transmitted to the disaster-recovery system in order toperform the synchronization, the cost to synchronize data block[00012947] would be a function of the transmitted 1.5 kilobytes.

In step 330, the processor compares the cost of synchronizing thecurrent data block by the above method of transmitting change vectors isgreater than a cost of synchronizing the current data block bytransmitting the entire updated data block stored in the productiondatabase to the disaster-recovery system.

In other words, if an embodiment of the present invention determinesthat communicating an image of the current, updated version of thecurrent data block is less costly than sending the change vectorsrequired in order for the disaster-recovery mechanism to recreate theupdated block, then the embodiment would send the image of the datablock. For example, if the embodiment has determined that threetransactions each altered a data block

-   -   the embodiment would identify data comprised by the data block        after it was altered by the three transactions. In step 330, the        processor would then determine whether it would be more        efficient to communicate the updated version of block [0001056F]        to the disaster-recovery mechanism than it would be to instead        communicate change vectors associated with the three        transactions.

In some embodiments, this comparison is made by comparing the amount ofdata that must be transmitted to the disaster-recovery system order toperform the synchronization by means of the above change-vector methodto the size of the data block that would otherwise be transmitted to thedisaster-recovery system.

In an earlier example, if data block [00012947] is smaller than the 1.5kilobytes needed to synchronize the current state of data block[00012947] in the production database with an analogous data block inthe backup database, then the processor in step 330 determines thattransmitting the block itself would be more efficient than transmittingthe corresponding change vectors and transaction data associated withtransactions that affected the content of data block [00012947]. ho thiscase, the method of FIG. 3 continues with step 360.

If, however, data block [00012947] is larger than 1.5 kilobytes, thenthe processor in step 330 determines that transmitting the block to thedisaster-recovery system would be less efficient than transmitting thecorresponding change vectors and transaction data. In this case, themethod of FIG. 3 continues with steps 340-350.

In other embodiments, the processor in step 330 compares costs bycomparing an amount of processor, memory, storage, or other types ofresources may be required by each synchronization method, or bycomparing extrinsic resources, such a elapsed time, resource-licensingcosts, or environmental costs. In some embodiments, the processor instep 330 may compare combinations of such costs, or of other types ofcosts relevant to the business.

Some embodiments of the present invention consider communicating a datablock or change vectors only if those vectors are associated withtransactions that actually changed or updated contents of the datablock. Other embodiments may also communicate, in steps 340-360, one ormore data blocks or change vectors, even if the performance oftransactions associated with or related to the change vectors effectedno changes, or no net change, to the one data blocks.

In step 340, the processor constructs an image of the latest version ofthe current data block by means known to those skilled in the art. Thisconstruction may comprise one or methods that may comprise, but are notlimited to: reproducing transactions performed upon an earlier versionof the block by performing operations identified by retained changevectors upon an earlier image of the block; copying a current version ofthe block stored in the production database; or otherwise determiningthe most current state of the block as a function of transactions thatmay have affected the contents or state of the block since the lastperformance of an embodiment of the present invention.

In step 350, the processor transmits the reconstructed block image tothe disaster-recovery system, using communications methods andmechanisms known to those skilled in the art.

In step 360, the processor transmits the change vectors and associateddata to the disaster-recovery system, in response to the processor instep 340 determining that transmitting the change vectors and associateddata is more efficient than transmitting an image of the current datablock.

The iterative procedure of steps 300-360 may continue in this manner,performing one iteration for each data block of the production database,or performing one iteration for each data block of the productiondatabase that has been altered by a transaction detected in step 200.

In each iteration, the processor may transmit to the disaster-recoverysystem information that the system needs to synchronize its copy of onedata block with an equivalent or analogous data block in the productdatabase.

In some embodiments, more than one such synchronization transmission maybe performed in aggregate, concurrently, or otherwise as part of agroup. In one example, a variant embodiment of the method of FIG. 3 maynot perform steps 350 and 360 until steps 300-340 have been performedfor all data blocks, or for all changed data blocks, of the productiondatabase. At the conclusion of the last iteration of steps 300-340, themethod of FIG. 3 may then transmit change vectors and block images forall such data blocks as an aggregated data transmission.

At the conclusion of the final iteration of the outer iterativeprocedure of steps 300-360, the processor will have transmitted to thedisaster-recovery system all information needed to synchronize thebackup database with the production database. This transmittedinformation may comprise sets of block images that may update blocksthat were the subject of a larger number of transactions or of a greateramount of data associated with transactions; and may further comprisesets of change vectors and associated data to update other blocks thatwere the subject of a smaller number of transactions or of a lesseramount of data associated with transactions.

In step 370, the disaster-recovery system applies the transmittedinformation to the backup database maintained b the disaster-recoverysystem. This applying may comprise copying data block images to thebackup database order to synchronize a first set of data blocks; andperforming operations identified by the transmitted change vectors inorder to synchronize a second set of data blocks. In each case, themethod selected to synchronize a particular data block will have beenselected as a function of the determination in step 330 that theselected method is the more efficient way to update that particular datablock.

1. A method for synchronizing a disaster-recovery system of a database,the method comprising: monitoring a set of transactions associated withthe database, where the database comprises a set of data blocks, andwhere each transaction of the set of transactions identifies analteration to one or more data blocks of the set of data blocks;choosing a subset of transactions of the set of transactions, where eachtransaction of the subset of transactions identifies an alteration to afirst data block of the set of data blocks; creating a set of blockimages, where a first image of the set of block images corresponds tothe first data block; generating a set of change vectors, where eachvector of the set of change vectors corresponds to one transaction ofthe subset of transactions, updating the first block image as a functionof changes made to the first block image by the subset of transactions;and determining whether transmitting the updated first block image tothe disaster-recovery system is more efficient than transmitting the setof change vectors to the disaster-recovery system, where the determiningis a function of comparing a first quantity of data comprised by theupdated first block image to a second quantity of data comprised by theset of change vectors.
 2. The method of claim 1, further comprising: theprocessor transmitting either the first block image or the set of changevectors to the disaster-recovery entity as a function of thedetermining.
 3. The method of claim 1, where a first change vector ofthe set of change vectors corresponds to a first transaction of thesubset of transactions, and where the first change vector comprises ablock identifier that identifies the first data block and a changeidentifier that identifies the first transaction.
 4. The method of claim1, where the choosing a subset comprises discarding an undo/redotransaction.
 5. The method of claim 1, where the choosing a subsetcomprises discarding a transaction that was not completed.
 6. The methodof claim 1, where the choosing a subset comprises discarding a pluralityof transactions that do not together effect a net change to datacomprised by the first data block.
 7. The method of claim 1, where thetransmitting is performed only if the updating results in a net changeto data comprised by the first data block.
 8. The method of claim 1,where the determining is a further function of comparing a firstquantity of data, which must be communicated in order to transmit theupdated first block image to the disaster-recovery system, to a secondquantity of data, which must he communicated in order to transmit theset of change vectors to the disaster-recovery system.
 9. The method ofclaim 1, further comprising providing at least one support service forat least one of creating, integrating, hosting, maintaining, anddeploying computer-readable program code in the computer system, wherethe computer-readable program code in combination with the computersystem is configured to implement the monitoring, choosing, creating,generating, updating, and determining.
 10. A computer program product,comprising a computer-readable hardware storage device having acomputer-readable program code stored therein, said program codeconfigured to be executed by a processor of a computer system toimplement a method for synchronizing a disaster-recovery system of adatabase, the method comprising: the processor monitoring a set oftransactions associated with the database, where the database comprisesa set of data blocks, and where each transaction of the set oftransactions identities an alteration to one or more data blocks of theset of data blocks; the processor choosing a subset of transactions ofthe set of transactions, where each transaction of the subset oftransactions identifies an alteration to a first data block of the setof data blocks; the processor creating a set of block images, where afirst image of the set of block images corresponds to the first datablock; the processor generating a set of change vectors, where eachvector of the set of change vectors corresponds to one transaction ofthe subset of transactions, the processor updating the first block imageas a function of changes made to the first block image by the subset oftransactions; and the processor determining whether transmitting theupdated first block image to the disaster-recovery system is moreefficient than transmitting the set of change vectors to thedisaster-recovery system, where the determining is a function ofcomparing a first quantity of data comprised by the updated first blockimage to a second quantity of data comprised b set of change vectors.11. The computer program product of claim 10, further comprising: theprocessor transmitting either the first block image or the set of changevectors to the disaster-recovery entity as a function of thedetermining.
 12. The computer program product of claim 10, where a firstchange vector of the set of change vectors corresponds to a firsttransaction of the subset of transactions, and where the first changevector comprises a block identifier that identifies the first data blockand a change identifier that identifies the first transaction.
 13. Thecomputer program product of claim 10, where the choosing a subsetcomprises discarding an undo/redo transaction.
 14. The computer programproduct of claim 10, where the choosing a subset comprises discarding atransaction that was not completed.
 15. The computer program product ofclaim 10, where the determining is a further function of comparing afirst quantity of data, which must be communicated in order to transmitthe updated first block image to the disaster-recovery system, to asecond quantity of data, which must be communicated in order to transmitthe set of change vectors to the disaster-recovery system.
 16. Acomputer system comprising a processor, a memory coupled to saidprocessor, and a computer-readable hardware storage device coupled tosaid processor, said storage device containing program code configuredto be run by said processor via the memory to implement a method forsynchronizing a disaster-recovery system of a database, the methodcomprising: the processor monitoring a set of transactions associatedwith the database, where the database comprises a set of data blocks,and where each transaction of the set of transactions identities analteration to one or more data blocks of the set of data blocks; theprocessor choosing a subset of transactions of the set of transactions,where each transaction of the subset of transactions identifies analteration to a first data block of the set of data blocks; theprocessor creating a set of block images, where a first image of the setof block images corresponds to the first data block; the processorgenerating a set of change vectors, where each vector of the set ofchange vectors corresponds to one transaction of the subset oftransactions, the processor updating the first block image as a functionof changes made to the first block image by the subset of transactions;and the processor determining whether transmitting the updated firstblock image to the disaster-recovery system is more efficient thantransmitting the set of change vectors to the disaster-recovery system,where the determining is a function of comparing a first quantity ofdata comprised by the updated first block image to a second quantity ofdata comprised b set of change vectors.
 17. The computer system of claim16, further comprising: the processor transmitting either the firstblock image or the set of change vectors to the disaster-recovery entityas a function of the determining.
 18. The computer system of claim 16,where a first change vector of the set of change vectors corresponds toa first transaction of the subset of transactions, and where the firstchange vector comprises a block identifier that identifies the firstdata block and a change identifier that identifies the firsttransaction.
 19. The computer system of claim 16, where the choosing asubset comprises discarding an undo/redo transaction, discarding atransaction that was not completed, or discarding a plurality oftransactions that do not together effect a net change to data comprisedby the first data block.
 20. The computer system of claim 16, where thedetermining is a function of comparing a first quantity of data, whichmust be communicated in order to transmit the updated first block imageto the disaster-recovery system, to a second quantity of data, whichmust be communicated in order to transmit the set of change vectors tothe disaster-recovery system.